package com.afdor.rws.dtm.api.model;

/**
 * Description: Resource that can be managed by Resource Manager and involved into global transaction. <br/>
 * ClassName: com.afdor.rws.dtm.api.model.Resource.java <br/>
 *
 * @author <a href="mailto:scwsl@foxmail.com">悭梵</a>
 * @version V1.0
 * @date Created in 2019-01-20 11:21
 * @since JDK 1.8
 */
public interface Resource {

    /**
     * Get the resource group id.
     * e.g. master and slave data-source should be with the same resource group id.
     *
     * @return resource group id.
     */
    String getResourceGroupId();


    /**
     * Get the resource id.
     * e.g. url of a data-source could be the id of the db data-source resource.
     *
     * @return resource id.
     */
    String getResourceId();
}
